This invention relates, to an optical reading device and, in particular, to an optical reading device, such as a bar code scanner, capable of accurately and quickly reading information, such as a bar code, over a wide range of contrast and ambient light conditions. This invention also relates to improved circuit means enabling the optical reading device to respond quickly and accurately.
In the description to(follow bar code scanners are used to explain the invention. However it should be understood that this is done for purpose of illustration, and that the invention has applicability to any suitable type of optical reader. Furthermore the circuit of the invention has general applicability.
Bar code scanners and like optical information reading devices, are typically required to operate under conditions where the ambient light can vary greatly. For example, these devices may be required to operate in warehouses where there is little if any ambient light, as well as in areas of bright sunlight. In addition, bar code scanners are needed to operate under widely different contrast conditions. An example of a "high contrast" condition occurs when the label or background is a clear white and the bars are very black (or vice-versa). A "Row contrast" condition occurs, for example, when the bars are "grayish" rather than black and/or when the background is not a clear white or is in fact of another color. To accurately read bar code data over a wide range of ambient light and contrast conditions presents significant problems. The nature and extent of these problems may be better explained with reference to a known CCD bar code scanner, shown in FIG. 1.
The bar code scanner of FIG. 1 includes a housing (1) in which is mounted a light source (2) to illuminate a bar code carrier (L) which may be a label or any medium to which is affixed a bar code; where a bar code includes a number of parallel white and black bars of different width and spacing. As is known in the art determining the number of bars, their widths and the spacing between the bars is critical to determining the types of code and the information being read. As may be seen from FIGS. 1 and 2, light reflected from the bar code carrier (L) is imaged onto a mirror 3 which projects the light via a lens and aperture system (4) onto a CCD image sensor (5). The CCD sensor (5) is controlled via clocking and timing circuitry contained in a signal processor (6). The data signals produced by the CCD sensor (5) are coupled to an analog signal processing section contained in processor (6) which processes the outputs of the CCD sensor for application to a microprocessor or controller (7). The controller (7), which may be part of processor (6), is used to calculate the number of bars read, the width of the bars and the spacing between the bars to determine the validity of the bar code data just read and the data information within the bar code just read.
FIG. 2A shows three (3) bars of a bar code and idealized signals typically produced and/or desired to be produced by the signal processing circuitry (6) in preparation of the application of the signals to the processor (7). The waveforms B, B1, B2 and B3 represent idealized output signals ("OS") of the CCD sensor (5) for various ambient light and contrast conditions. Idealized waveforms C, C1, C2 and C3 represent the envelope of the signals (corresponding respectively to waveforms B, B1, B2 and B3), produced at an output 63 of a low pass filter 6B (see FIG. 3). Idealized waveforms D, D1, D2 and D3 represent signals produced at an output 65 of a comparator 6D (see FIG. 3). As discussed below, it is an object of the circuits and systems of the invention to produce signal responses approaching the idealized condition.
An examination of the waveforms B, B1, B2, and B3 of FIG. 2A indicates the following. For a high contrast, high ambient condition the difference "h1" between the "dark" and "light" bars of a bar code is well defined, and the signal spans the voltage range V.sub.A to V.sub.B. For a low contrast, high ambient light condition, the difference "h2" betweenn the "dark" and "light" bars of a bar code is small (peak-to-peak signal is small) and the signal rides on, or near, a "low" voltage level, shown as V.sub.B FIG. 2A. For a low contrast low ambient light condition, the difference "h3" between the "dark" and "light" bars of a bar code is very small (i.e. peak-to-peak signal is small) and the signal rides on, or near, a "high" voltage level, shown as V.sub.A FIG. 2A. For a high contrast, low ambient condition the difference "h4" between the "dark" and "light" bars of a bar code is well defined (i.e the peak-to-peak signal is well defined), however the signal rides on, or near, a "high" voltage level, shown as V.sub.A. This examination reveals that the output signal from the CDD may vary greatly in amplitude from a very small peak-to-peak value to a very large peak-to-peak value and that the signal may ride on a voltage level which shifts from a "low" voltage level (e.g. V.sub.B) to a "high" voltage level (e.g. V.sub.A). Processing these signals accurately and reliably is highly problematic, particularly when the signal may shift through all the variations discussed above during the scan of a single bar code.
Problems associated with the processing of the signal are further explained with reference to FIG. 3. FIG. 3 shows an analog signal processing circuit disclosed in my co-pending application titled OPTICAL READER EMPLOYING LOGARITHMIC AMPLIFIERS, filed Dec. 27, 1993 and whose Ser. No. is 08/174,159, the teachings of which are incorporated herein by reference.
Referring to FIG. 3 note that the image sensor (5) also referred to herein as a CCD sensor or CCD imager, has an output signal (OS) terminal which is applied to the data signal input terminal 61 of the analog data processing circuitry of circuit (6).
The output signal (OS) of the sensor 5 is applied to node 61 to which is connected the inputs of logarithmic ("log") amplifiers 6A1 and log amplifier 6A2. (The outputs of log amplifiers 6A1 and 6A2 are connected to a terminal 62. One of the logarithmic amplifiers (e.g. 6A1) is designed to primarily respond to, and handle, high frequency components of the "OS" signal and the other logarithmic amplifier (e.g. 6A2) is designed to primarily respond to, and handle, the lower frequency components of the "OS" signal. The combination of the two "log" amplifiers and the use of dual paths to process and transfer the signal results in a significantly improved performance.
The outputs of logarithmic amplifiers 6A1 and 6A2 are summed at node 62 and applied to a low pass filter 6B. An output of low pass filter 6B is produced at output 63 which is then applied to an input of a linear amplifier 6C. An output of linear amplifier 6C is applied to a signal input of comparator circuitry 6D and to a slice signal generating circuit 6E. An output 66 of the slice signal generating circuit 6E is applied to comparator 6D. Slice generator 6E functions to determine the 1/2 point between the peak to peak amplitude of the signals at the output of amplifier 6C. The 1/2 point is then used as the comparison point for comparator circuit 6D which then generates data "high" and data "low". The slice circuit in combination with the comparator acts as a 1 bit analog-to-digital (A/D) converter. In one sense the slice generator functions as a transition detector. That is the slice circuits is used to sense and indicate the positive going and negative going transitions of the bar code signal. The slice circuit in combination with comparator circuit 6D is used to generate digital pulses which are proportional to the bar code width and are an electronically accurate rendition of the bar code.
As suggested above, the "slice" generator is used to detect the transition from black to white and white to black read by the bar code reader. This function is critical to determine the width and spacing of the black and white bars. To further appreciate the problems resolved by the invention reference is now made to FIGS. 4 and 5 which show prior art "slice" generators and to FIG. 6 which shows a waveform of a signal which may be produced at an output of linear amplifier 6C and the problem in detecting its transitions with the prior art circuitry.
Referring to FIGS. 4 AND 5, note that the output 40 in FIG. 4 and the output 400 in FIG. 5 include a resistor capacitive (RC) network which provides a time delay which must be discharged to enable the circuit to respond properly. The RC network must also be charged for the circuit to work properly. Hence slice circuits employing RC networks present a problem at the beginning of a read cycle and during each read cycle when the signal varies rapidly and widely.
The problem with time delays associated with RC time constants is best explained with reference to FIG. 6. The analog signal produced at the output 67 of linear amplifier 6E (see FIG. 3) may be as shown by a solid line (V.sub.S) in FIG. 6. Assume that the output 40, or 400, decays slowly as shown by the dashed lines in FIG. 6. When the input signal varies rapidly and widely (as shown by the solid line in FIG. 6), pulses produced at output 65 of comparator 6D (see FIG. 3) will be shortened, as shown in FIG. 6 for period t.sub.1 to t.sub.1a, and pulses may be totally missed as shown for period t.sub.4 to t.sub.7.
The problem is aggravated because of rapid changes in ambient light conditions and in contrast conditions. These rapid changes cause rapid changes in the peak-to-peak value of the signal (V.sub.S) and cause a shift in the dc (or ac) level (range of V.sub.C to V.sub.D) about which the signal changes are occurring as illustrated in FIG. 6.
The prior art circuit of FIG. 4 is considered to be a "diode-follower" slice type. FIG. 4 shows an analog input signal coupled via a buffer B1 to a pair of diodes (d1,d2) connected in parallel in opposite conductive directions to each other and a smoothing (filter) network (C1, R1). The output voltage 40 of the filter stores the peak charging and discharging voltages developed across peak holding capacitor C1. The buffer output (V37) and the filter output (V40) are then applied to a comparator 22.
Normally, the output voltage 40 across the peak holding Capacitor (C1) will be V.sub.F volts less than the voltage (V37) at the output of B1 for increasing values of signal and will be V.sub.F volts above V37 for decreasing values of V37; where V.sub.F is the forward voltage drop of diodes d1, d2. However due to the RC time constant (R7, R1, C1) there is a delay before the RC network is charged or discharged towards the input voltage (i.e. V37). This presents a problem in reading a high resolution bar code having a bar whose width is so small that the circuit can not respond to its presence.
The slice circuit shown in FIG. 5 is of the type which is generally referred to as a "center slice" type and includes amplifiers A1, A2; resistors R4, R5, R6; diodes d1, d2; and peak hold capacitors C4, C5.
The output voltage 400 of the slice circuit of FIG. 5 is approximately equal to the center value of the peak voltage values in between the value corresponding to a white bar and the value corresponding to a black bar.
However, the center slice type circuit in FIG. 5 has the following problems and/or drawbacks:
a) The band range of signal which can be sliced depends on the time constant of smoothing (filter) circuitry (C4, C5, R4, R5, R6) and is limited to it. Consequently, the circuit characteristic will be in a narrow band area.
b) As the time constant is fixed, it cannot accurately follow the sudden variations in signal amplitude and frequency resulting from the sudden variations in ambient light. Consequently, the output of the comparator (TTL signal) will be inaccurate causing a high percentage of erroneous and/or missed readings (see FIG. 6).
c) To increase the speed of response of the output voltage 400 the time constant of the filtering circuitry has to be made smaller, and the VF value of the diodes (d1, d2) has also to be smaller. However, this causes the slicing operation to be affected by noise signals resulting from incompletely printed bar codes and/or rough paper surface.
d) On the other hand, if the value of VF and the time constant are increased, a bar code signal containing a signal pulse of a smaller width and a smaller amplitude may not be sliced accurately.
e) When the positive going slope of the slicing signal is moderate, the black bar at the edge of a bar code cannot be recognized. Therefore, the length of a bar code readable electrically is shorter than the length of a bar code readable optically.
f) And for condition of low contrast bar code readable electrically will further be decreased.
g) At the beginning of each scan, when the reader starts reading from a background to the first bar, there will be a distortion. At that time as the slice signal becomes to the same degree as that of the analog signal, TTL signal corresponding to the first bar will be distorted which effects the pulse width to be larger than its accurate value.
h) When ambient light is stronger or the print contrast signal (PCS) is lower, the entire bar code signal will reach extremely near to the white level which makes the signal difficult to follow to the bar code signal. That is, the signal may move towards the level V.sub.A or V.sub.B, representing the white levels.
i) The prior art slicing function does not work accurately for a bar code signal of narrow width and small amplitude, such as the analog signal from a bar code having a low resolution ratio.
j) The length of a bar code read electrically will be shorter than the actual length of a bar code read optically.
k) When the print contrast signal (PCS) value is lower the length of a bar code read electrically will further be shorter.